package com.suli.multimedia.entity.vo;

import com.suli.multimedia.entity.Article;
import com.suli.multimedia.entity.ArticleContent;
import com.suli.multimedia.enums.ArticleType;
import lombok.*;

import java.util.Date;


/**
 * @author admin
 * @version 1.0 <br/>
 * <p style="font-family:SimSun;font-weight:bold">时间:<br/>2022/3/16 10:18</p>
 */
@Getter
@Setter
@ToString
@NoArgsConstructor
public class ArticleVO extends Article {
    String articleContent;
    String author;

    public ArticleVO(Integer articleId, ArticleType articleType, String userId, String articleTitle, Date publishTime, Integer isDeleted, Integer views, String articleContent, String author) {
        super(articleId, articleType, userId, articleTitle, publishTime, isDeleted, views);
        this.articleContent = articleContent;
        this.author = author;
    }
    /* public static ArticleVO getArticle(Article article, ArticleContent articleContent,String username){
        ArticleVO articleVO=new ArticleVO();
        articleVO.setArticleId(article.getArticleId());
        articleVO.setArticleTitle(article.getArticleTitle());
        articleVO.setArticleType(article.getArticleType());
        articleVO.setPublishTime(article.getPublishTime());
        articleVO.setUserId(article.getUserId());
        articleVO.setIsDeleted(article.getIsDeleted());
        articleVO.setArticleContent(articleContent.getArticleContent());
        articleVO.setViews(article.getViews());
        articleVO.setAuthor(username);
        return articleVO;
    }*/
}
